const mysql = require("mysql2");
let pool = mysql.createPool({
  host: "localhost",
  port: "3306",
  user: "root",
  password: "mWXS19971222@.",
  database: "sequelize",
});
const dbPool = {
  pool: {},
  create() {
    this.pool = pool;
  },
  connect(sql, arr, cb) {
    this.pool.getConnection(function (err, connection) {
      connection.query(sql, arr, cb);
      connection.release();
    });
  },
};
dbPool.create();
module.exports = dbPool;
